#ifndef __MY_TASK_H_
#define __MY_TASK_H_

#include "main.h"

extern volatile uint32_t realTicks;

extern uint8_t wsAnimeFlag;
extern uint8_t wsAnimeTime;
extern uint8_t wsAnimeTimeFlag;

typedef struct{
    uint8_t run;
    uint32_t event;
    uint32_t delayTicks;
    uint32_t tickCounts; // 赋值为 0 将被挂起 50 天
    uint32_t tickReload;

    uint8_t *flag;

    void (*pTaskFunc)(void *param);
}taskCtrl;

void tick_tack(void);
void task_schedule(void);
void start_schedule(void);
void stop_schedule(void);

void get_battery_voltage(float *vol);
uint8_t get_battery_percent(void);

#endif
